import QtQuick 6.0
import QtQuick.Controls 6.0
import QtQuick.Layouts 6.0
ApplicationWindow {
    visible: true
    width: 640
    height: 480
    title: "导航示例"
    menuBar: MenuBar {
        Menu {
            title: "文件"
            MenuItem {
                text: "打开"
            }
            MenuItem {
                text: "保存"
            }
        }
         Menu {
            title: "edit"
            MenuItem {
                text: "next"
            }
            MenuItem {
                text: "undo"
            }
        }
    }
    // 顶部工具栏
    header: ToolBar {
        Flow {
            anchors.fill: parent
            ToolButton {
                text: "主页"
                onClicked: swipeView.currentIndex = 0
            }
            ToolButton {
                text: "内容"
                onClicked: swipeView.currentIndex = 1
            }
            ToolButton {
                text: "关于"
                onClicked: swipeView.currentIndex = 2
            }
        }
    }
  
    SwipeView {
        id: swipeView
        anchors.fill: parent
        Page {
            Home {
                text: "主页"
            }
        }
        Page {
           Content  {}
                
             
        }
        Page {
            Home {
                text: "关于"
            }
        }
    }
    
}